﻿Public Class DungeonFloorObj
    Inherits Button

    Public Property Passable As Boolean
    Public Property Stoppable As Boolean
    Public Property LeftWall As Boolean
    Public Property RightWall As Boolean
    Public Property TopWall As Boolean
    Public Property BottomWall As Boolean

    ''' <summary>
    ''' should only be one head ever per registry, it is our link between
    ''' the mdi position and grid position
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Property IsHead As Boolean
    
    Public Property Piece As GamePiece

    Public Sub New(ByVal x As Integer, ByVal y As Integer, ByVal leftWallIn As Boolean, ByVal rightWallIn As Boolean, ByVal topWallIn As Boolean, ByVal bottomWallIn As Boolean)
        Me.Passable = True
        Me.Stoppable = True
        Me.LeftWall = leftWallIn
        Me.RightWall = rightWallIn
        Me.TopWall = topWallIn
        Me.BottomWall = bottomWallIn
        Me.Size = New Size(20, 20)
        Me.FlatStyle = FlatStyle.Flat
        Me.Location = New Point(x, y)
        Me.BackColor = Color.LightGray
        Me.ForeColor = Color.DimGray
        Me.Name = "CELL_" + x.ToString + "_" + y.ToString
    End Sub

    Public Sub DarkenRoom()

        Select Case Me.BackColor

            Case Color.DarkGray
                'nothing, that's as dark as we get

            Case Color.Gray
                Me.BackColor = Color.DarkGray

            Case Color.LightGray
                Me.BackColor = Color.Gray

        End Select

    End Sub

    Public Sub LightenRoom()

        Select Case Me.BackColor

            Case Color.DarkGray
                Me.BackColor = Color.Gray

            Case Color.Gray
                Me.BackColor = Color.LightGray

            Case Color.LightGray
                'nothing, that's as light as we get

        End Select

    End Sub

End Class
